From 25daf36b18086096651b381223ad8f03fbca5045 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Fri, 21 Feb 2025 17:07:35 -0500
Subject: Retire use of $page store in favour of Sv5 page state

---
 ui/routes/(app)/ch/[channel]/+page.svelte | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'ui/routes/(app)/ch/[channel]/+page.svelte')

diff --git a/ui/routes/(app)/ch/[channel]/+page.svelte b/ui/routes/(app)/ch/[channel]/+page.svelte
index 9335198..84cb0ae 100644
--- a/ui/routes/(app)/ch/[channel]/+page.svelte
+++ b/ui/routes/(app)/ch/[channel]/+page.svelte
@@ -1,11 +1,11 @@
 <script>
   import { DateTime } from 'luxon';
-  import { page } from '$app/stores';
+  import { page } from '$app/state';
   import ActiveChannel from '$lib/components/ActiveChannel.svelte';
   import MessageInput from '$lib/components/MessageInput.svelte';
   import { channelsList, messages } from '$lib/store';
 
-  let channel = $derived($page.params.channel);
+  let channel = $derived(page.params.channel);
   let messageRuns = $derived($messages.inChannel(channel));
   let activeChannel;
 
@@ -58,6 +58,7 @@
   }
 
   let lastReadCallback = null;
+
   function onscroll() {
     clearTimeout(lastReadCallback); // Fine if lastReadCallback is null still.
     lastReadCallback = setTimeout(setLastRead, 2 * 1000);
-- 
cgit v1.2.3

